//
// Created by aserli li on 2025/4/26.
//

#ifndef LLVM_ENCODEFUNCTIONNAME_H
#define LLVM_ENCODEFUNCTIONNAME_H

#include "llvm/IR/PassManager.h"

namespace llvm {

class EncodeFunctionNamePass2 : public PassInfoMixin<EncodeFunctionNamePass2> {
public:
  EncodeFunctionNamePass2();

  PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);

  void genNewFunctionName(Function &F, std::string& NewFunctionName);

  static bool isRequired() { return true; }

private:
  int RandomId = 0;
};

} // namespace llvm

#endif // LLVM_ENCODEFUNCTIONNAME_H
